The present invention relates to control of stepper motors. More particularly, the present invention relates to apparatus and method for sensorless detection of load torque of a stepper motor and for optimizing drive current for efficient operation.
Stepper motors are used for position control and are designed to operate in open loop (no position feedback). Their inherent stepping ability allows for accurate positioning without feedback.
A stepper motor is usually run at a constant current and the current setting needs to be tuned according to the load conditions of the application in which it is used. The objective of the current setting is to run the stepper motor as cool as possible while ensuring that no steps are skipped (slipping) during operation.
In most situations a stepper motor is operated with motor current that is considerably higher than the actual motor load, i.e., the motor is operated having a torque reserve that is much too high. This leads to excessive current flowing through the motor windings, leading to unnecessary heating of the motor. To arrive at an optimum current level that provides enough torque to avoid slipping, multiple tries based on trial and error are used. In general, a safety margin is provided in the current setting so that the torque equivalent to current setting (i.e., the torque produced by the motor when a current equivalent to the current setting flows through the motor) is sufficiently greater than the load torque (i.e., the torque experienced by the motor from the load) to avoid slipping.
The load torque profile of a stepper motor is not always flat and can have peak torque under certain conditions. The current setting used also depends on the motor speed, higher current being required for higher speed. If the current is set to compensate for peak load torque, it may be too high for other load conditions. This leads to higher power consumption and reduced efficiency. Also, selection of motor power rating will depend on the peak load torque profile.
One known way to control a stepper motor in open loop is called vector control and is illustrated in FIG. 1. The stepper motor 10 consists of two coils La (12) and Lb (14), which are driven by a stepper motor driver 16. The actual currents Ia and Ib flowing in the coils La (12) and Lb (14) are measured using conventional current-measuring techniques and are transformed from the stationary domain to calculated currents Id and Iq in the d-q domain based on the imposed angle θ using the well-known Park transform as indicated at reference numeral 18. As is known in the art, the imposed angle θ is generated by the “stepper angle” module 20 based on the desired number of steps and speed presented to inputs 22 and 24, respectively.
A current controller 26 operates by computing Vd and Vq from the calculated currents Id and Iq. The reference current Iq_ref is always set to 0 and the reference current Id_ref is set based on a maximum expected load torque value. The voltages Vd and Vq are then transformed into stationary domain by calculating voltages Va and Vb at reference numeral 28 using an inverse Park transform. A pulse-width-modulation (PWM) module 30 is used to generate drive signals that impose calculated voltages Va and Vb through the stepper motor driver 16. The rotor of the stepper motor moves through command steps at the commanded speed. As indicated above, the “stepper angle” module 20 generates the imposed angle θ based on steps and speed commands set by the user. Each step corresponds to 90 degrees of angle and the rate of change of angle is dependent on the speed. The stepper angle circuit generates angle θ output by integrating the speed input 24 over time. The integration is halted when the angle θ corresponding to the input command steps 22 is reached. The relation between angle θ and the input command steps 22 is given by:θ=(command_steps*π)/2
The actual motor coil currents are transformed into a rotating reference frame designated d-q at reference numeral 18 using a Park transform based on imposed angle θ according to the equationsId=Ia cos θ+Ib sin θIq=−Iq sin θ+Ib*cos θ
The voltages Vd and Vq are transformed from the d-q reference frame to voltages in the stationary domain at reference numeral 28 by calculating voltages Va and Vb using an inverse Park transform based on the angle θ according to the equationsVa=Vd cos θ−Vq sin θθVb=Vd sin θ+Vq cos θ
The current controller 26 forces the calculated currents Id and Iq to follow reference currents Id_ref and Iq_ref by calculating Vd and Vq. A PI controller is a simple and widely used form of controller and is suitable for this purpose.
The PWM module 30 compares the input reference signal with a higher frequency modulator signal and generates a pulsed output whose average value is equivalent to the input reference.
The stepper driver 16 imposes driving voltages on stepper coils La and Lb based on signals from PWM module 26. Ultimately, the above solution provides a drive current based on the fixed reference current Id_ref which is based on the maximum expected load torque value. The reference current is thus not dynamic, and leads to wasted energy.